/**
 * MoteAppNumbersActivity.java
 *
 * Created on 19 Mar 2011
 *
 * @author Andrew H Moss
 *
 */
package com.mossdev.android.moteapp;

import android.app.Activity;
import android.os.Bundle;
import android.widget.Button;

import com.mossdev.android.moteapp.comms.Commands;
import com.mossdev.android.moteapp.listeners.ButtonOnClickListener;

/**
 * MoteAppNumbersActivity
 * An activity for letting the user input numbers and coloured
 * buttons into the 'remote'.
 * 
 * @author Andrew Moss
 */
public class MoteAppNumbersActivity extends Activity {
	
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.numbers);
        
        //Set up buttons
        Button temp_button;
        temp_button = (Button)findViewById(R.id.Number1);
        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.ONE));
        temp_button = (Button)findViewById(R.id.Number2);
        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.TWO));
        temp_button = (Button)findViewById(R.id.Number3);
        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.THREE));
        temp_button = (Button)findViewById(R.id.Number4);
        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.FOUR));
        temp_button = (Button)findViewById(R.id.Number5);
        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.FIVE));
        temp_button = (Button)findViewById(R.id.Number6);
        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.SIX));
        temp_button = (Button)findViewById(R.id.Number7);
        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.SEVEN));
        temp_button = (Button)findViewById(R.id.Number8);
        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.EIGHT));
        temp_button = (Button)findViewById(R.id.Number9);
        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.NINE));
        temp_button = (Button)findViewById(R.id.Number0);
        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.ZERO));
        temp_button = (Button)findViewById(R.id.NumberStar);
        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.STAR));
        temp_button = (Button)findViewById(R.id.NumberHash);
        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.HASH));
        temp_button = (Button)findViewById(R.id.ColourBlue);
        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.BLUE));
        temp_button = (Button)findViewById(R.id.ColourRed);
        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.RED));
        temp_button = (Button)findViewById(R.id.ColourYellow);
        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.YELLOW));
        temp_button = (Button)findViewById(R.id.ColourGreen);
        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.GREEN));
        
    }


}
